
<#include "/common/head.html"/>


 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
            <tr>
           		<th><span id="title_label">活动主题：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="title" id="title" value="" data-options="fit: true,required:true"></input></div>
           		</td>
            <tr>
           		<th><span id="info_label">活动简介：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="info" id="info" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="starttime_label">开始时间：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-datebox" type="text" name="starttime" id="starttime" value="" data-options="fit: true,required:true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="endtime_label">结束时间：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-datebox" type="text" name="endtime" id="endtime" value="" data-options="fit: true,required:true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="type_label">类型：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="type" id="type" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
        </table>
    </form>
</div>
<script>

top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			if(data.result == "success") {
				top.window.closeWindow();
				top.window.subPage.loadCurrDatagrid();
			}
		});
	}
}
function getParam() {
	var param = {
	     
       		"model.title": getInputValue("title"), 
       		"model.info": getInputValue("info"), 
       		"model.starttime": getInputValue("starttime"), 
       		"model.endtime": getInputValue("endtime"), 
       		"model.type": getInputValue("type"), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
